<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta charset="utf-8" />
<title>Form Elements - Ace Admin</title>

<meta name="description" content="Common form elements and layouts" />
<meta name="viewport"
	content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />

<!-- bootstrap & fontawesome -->
<link rel="stylesheet"
	href="<%=request.getContextPath()%>/ace/assets/css/bootstrap.min.css" />
<link rel="stylesheet"
	href="<%=request.getContextPath()%>/ace/assets/css/font-awesome.min.css" />

<!-- page specific plugin styles -->
<link rel="stylesheet"
	href="<%=request.getContextPath()%>/ace/assets/css/jquery-ui.custom.min.css" />
<link rel="stylesheet"
	href="<%=request.getContextPath()%>/ace/assets/css/chosen.min.css" />
<link rel="stylesheet"
	href="<%=request.getContextPath()%>/ace/assets/css/bootstrap-datepicker3.min.css" />
<link rel="stylesheet"
	href="<%=request.getContextPath()%>/ace/assets/css/bootstrap-timepicker.min.css" />
<link rel="stylesheet"
	href="<%=request.getContextPath()%>/ace/assets/css/daterangepicker.min.css" />
<link rel="stylesheet"
	href="<%=request.getContextPath()%>/ace/assets/css/bootstrap-datetimepicker.min.css" />
<link rel="stylesheet"
	href="<%=request.getContextPath()%>/ace/assets/css/bootstrap-colorpicker.min.css" />


<!-- ace styles -->
<link rel="stylesheet"
	href="<%=request.getContextPath()%>/ace/assets/css/ace.min.css"
	id="main-ace-style" />

<!--[if lte IE 9]>
			<link rel="stylesheet" href="<%=request.getContextPath()%>/ace/assets/css/ace-part2.min.css" />
		<![endif]-->
<link rel="stylesheet"
	href="<%=request.getContextPath()%>/ace/assets/css/ace-skins.min.css" />
<link rel="stylesheet"
	href="<%=request.getContextPath()%>/ace/assets/css/ace-rtl.min.css" />

<!--[if lte IE 9]>
		  <link rel="stylesheet" href="<%=request.getContextPath()%>/ace/assets/css/ace-ie.min.css" />
		<![endif]-->

<!-- inline styles related to this page -->

<!-- ace settings handler -->
<script
	src="<%=request.getContextPath()%>/ace/assets/js/ace-extra.min.js"></script>

<!-- HTML5shiv and Respond.js for IE8 to support HTML5 elements and media queries -->

<!--[if lte IE 8]>
		<script src="<%=request.getContextPath()%>/ace/assets/js/html5shiv.min.js"></script>
		<script src="<%=request.getContextPath()%>/ace/assets/js/respond.min.js"></script>
		<![endif]-->
</head>

<body class="no-skin">
	

	<!-- /section:basics/content.breadcrumbs -->
	<div class="page-content">
		<!-- /section:settings.box -->
		<div class="page-content-area">
			<div class="page-header">
				<h1>上传视频</h1>
			</div>
			<!-- /.page-header -->

			<div class="row">
				<div class="col-xs-12">
					<!-- PAGE CONTENT BEGINS -->
					<form id="drizzt-table" class="form-horizontal"
						action="<%=request.getContextPath()%>/bsbVideo/create.do"
						method="post">
						<!-- #section:elements.form -->
						 
  						<div class="form-group">
							<label class="col-sm-1 control-label no-padding-right"
								for="form-field-1"> 视频名称 </label>

							<div class="col-sm-9">
								<input type="text" id="form-field-1"
									placeholder="title"
									name="title" maxlength="100"
									class="col-xs-10 col-sm-5" />
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-1 control-label no-padding-right"
								for="form-field-1"> 视频id </label>

							<div class="col-sm-9">
								<input type="text" id="form-field-1"
									placeholder="vid"
									name="vid"
									class="col-xs-10 col-sm-5" />
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-1 control-label no-padding-right"
								for="form-field-1"> 视频封面 </label>

							<div class="col-sm-9">
								<img id="imageRotation" alt="" width="200px" height="200px">
								<input type="file" id="file"  onchange="ajaxFileUpload()" name="file" />
								<input type="hidden" name="image" id="rotation">
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-1 control-label no-padding-right"
								for="form-field-1">选择行业</label>

							<div class="col-sm-3">
								<select name="trade">
									<option value="">--选择行业--</option>
									<c:forEach items="${trades }" var="trade">
										<option value="${trade.uuid }">${trade.name }</option>
									</c:forEach>
								</select>
							</div>
							<label class="col-sm-1 control-label no-padding-right"
								for="form-field-2">选择税种</label>

							<div class="col-sm-3">
								<select name="tax">
									<option value="">--选择税种--</option>
									<c:forEach items="${taxs }" var="tax">
										<option value="${tax.uuid }">${tax.name }</option>
									</c:forEach>
								</select>
							</div>
							<label class="col-sm-1 control-label no-padding-right"
								for="form-field-3">选择专题</label>

							<div class="col-sm-3">
								<select name="topic">
									<option value="">--选择专题--</option>
									<c:forEach items="${topics }" var="topic">
										<option value="${topic.uuid }">${topic.name }</option>
									</c:forEach>
								</select>
							</div>
						</div>
						  						<div class="form-group">
							<label class="col-sm-1 control-label no-padding-right"
								for="form-field-1"> 栏目 </label>

							<div class="col-sm-9">
								<select name="type">
									<option value="">--选择栏目--</option>
									<c:forEach items="${videoCategory }" var="category">
										<option value="${category.index }">${category.name }</option>
									</c:forEach>
								</select>
							</div>
						</div>
						  						<div class="form-group">
							<label class="col-sm-1 control-label no-padding-right"
								for="form-field-1"> 视频价格 </label>

							<div class="col-sm-9">
								<input type="number" id="form-field-1"
									placeholder="price"
									name="price" min="0"
									class="col-xs-10 col-sm-5" />
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-1 control-label no-padding-right"
								for="form-field-1"> 排序</label>

							<div class="col-sm-9">
								<input type="number" 
									placeholder="排序"
									name="sort" min="0"  value="20"
									class="col-xs-10 col-sm-5" />
							</div>
						</div>
						  						
						  						
						 
						<div class="clearfix form-actions">
							<div class="col-md-offset-3 col-md-9">
								<input  class="btn btn-info" type="submit" value="提交" /> 

								&nbsp; &nbsp; &nbsp;
								<input type="button" class="btn btn-info" onclick="history.go(-1)" value="返回" />
							</div>
						</div>
					</form>

					<!-- PAGE CONTENT ENDS -->
				</div>
				<!-- /.col -->
			</div>
			<!-- /.row -->
		</div>
		<!-- /.page-content-area -->
	</div>
	<!-- /.page-content -->
</body>

<!-- basic scripts -->

<!--[if !IE]> -->
<script type="text/javascript">
	window.jQuery
			|| document
					.write("<script src='<%=request.getContextPath()%>/ace/assets/js/jquery.min.js'>"
							+ "<"+"/script>");
</script>

<!-- <![endif]-->

<!--[if IE]>
<script type="text/javascript">
 window.jQuery || document.write("<script src='<%=request.getContextPath()%>/ace/assets/js/jquery1x.min.js'>"+"<"+"/script>");
</script>
<![endif]-->
<script type="text/javascript">
	if ('ontouchstart' in document.documentElement)
		document.write("<script src='<%=request.getContextPath()%>/ace/assets/js/jquery.mobile.custom.min.js'>" + "<"+"/script>");
</script>

<script
	src="<%=request.getContextPath()%>/ace/assets/js/bootstrap.min.js"></script>
<script type="text/javascript" src="${ctx }/static/js/ajaxfileupload.js"></script>	
<script type="text/javascript">
function ajaxFileUpload(){
	$.ajaxFileUpload({
		url:'<%=request.getContextPath()%>/uploadimage', //上传的地址
		fileElementId:'file',//上传文件的id
		dataType: {},
		success: function (data){
			$("#rotation").val(data);
			$("#imageRotation").attr("src","${ctx}/getPic/"+data);
		}
	})
}
</script>
</html>
